<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %> 
<script type="text/javascript">
function cm_showsync(id)
{
    var url = "mg/sync/show.do";
    var content = "syncconfig.id=" + id
                + "&syncconfig.channelid=" + document.getElementById("channelid").value;
    var objectid = "cm_syncconfig";
    sendXMLHttpRequest(url, content, objectid); 
}

</script>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="25" class="t1">
          <img src="images/small0.gif" width="14" height="12"> 您现在的位置&gt;&gt;配置管理</td>
      </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td >
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" class="table_blue">
          <input type="hidden" id="channelid" name="channelid" value="<s:property value="channel.id"/>">
          <strong><img src="images/dot.jpg" width="13" height="9">配置列表（厂商：<s:property value="channel.id+' - '+channel.name"/>）</strong>
          <span style="float:right;color:#000000;">
          <s:if test="list.size <= 0" >        
	          <button id="btn1" dojoType="dijit.form.Button" 
	            onclick="cm_showsync(-1);">新增</button>
          &nbsp;&nbsp;
          </s:if>
          </span>
          </td>
      </tr>   
      <tr>
      <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0"
           style="word-break:break-all;">
      <tr>
        <td align="center" class="table_g1" width="10%">ID</td>
        <td align="center" class="table_g2" width="15%">日限</td>
        <td align="center" class="table_g2" width="15%">日百分比</td>
        <td align="center" class="table_g2" width="15%">总限</td>
        <td align="center" class="table_g2" width="15%">计费日限</td>
        <td align="center" class="table_g2" width="15%">计费月限</td>
        <td align="center" class="table_g2" width="15%"></td>
      </tr>
      
      <s:if test="list.size > 0" >
        <s:iterator value="list" status="stat">
        <tr class="trselect"> 
          <td class="table_w1" align="center"><s:property value="id" /></td>
          <td class="table_w2" align="center"><s:if test="daylimit<0">不限</s:if><s:else><s:property value="daylimit" /></s:else></td>
          <td class="table_w2" align="center"><s:if test="dayratio<0">不限</s:if><s:else><s:property value="dayratio" /></s:else></td>
          <td class="table_w2" align="center"><s:if test="totallimit<0">不限</s:if><s:else><s:property value="totallimit" /></s:else></td>
          <td class="table_w2" align="center"><s:property value="paydaylimit" /></td>
          <td class="table_w2" align="center"><s:property value="paymonthlimit" /></td>
          <td class="table_w2" align="center">
            <a href="javascript:void(0);" 
              onclick="cm_showsync(<s:property value="id" />);">设置</a>
              &nbsp;&nbsp;
        </tr>    
        </s:iterator>
      </s:if>
      <s:else>
      <tr>
        <td class="table_w1" align="center" colspan="7">无</td>
      </tr>
      </s:else>
      </table>
      </td>
      </tr>
      <tr>
        <td align="center" class="table_w1">
            <button id="btnBack" dojoType="dijit.form.Button"  
                onclick="cm_listchannelconfig();">返回</button>
        </td>          
      </tr>
      <tr> 
        <td background="images/table_bom_bg.jpg">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <img src="images/table_bom_left.jpg" width="20" height="15"></td>
            <td></td>
            <td align="right">
              <img src="images/table_bom_right.jpg" width="20" height="15"></td>
          </tr>
          </table>
        </td>
      </tr>
    </table>  
  </td>
  <td width="5"></td>
  </tr>
  </table>
  <div id="cm_syncconfig"></div>  